package com.dxb.comsumer;

import com.dxb.api.ResourceService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName：com.dxb.comsumer.ResourceController <br>
 * Description：TODO <br>
 *
 * @author 戴晓波 <br>
 * Date 2021/9/22/0022 17:24 <br>
 * @version v1.0 <br>
 */
@RestController
@RequestMapping("dubbo")
public class ResourceController {

    @DubboReference(url = "dubbo://localhost:28082")
    private ResourceService resourceService;

    @GetMapping("/hello")
    public String hello(String name) {
        return resourceService.hello(name);
    }
}
